﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Wekit.Model.Info;
using Wekit.Repository.Article;
namespace Wekit.Controllers.Publish
{
    /// <summary>
    /// 文章信息登录首页
    /// </summary>
    public class HomeController : Controller
    {
        public IArticleRepository ArticleRepository { get; set; }

        
        public ActionResult Index()
        {
            return View();
        }

        [HttpGet]
        public ActionResult Add()
        {

            return View();
        }

        [HttpPost]
        public ActionResult Add(ArticleCategory category, Wekit.Model.Info.Article articale)
        {
            articale.Content = "测试信息";
            ArticleRepository.addArticle(articale);
            return View("AddSuccess");
        }

    }
}
